<?php
$obj=new mysql($config);

//导航栏目
$sql="select * from `cate` where `pid`=0";
$cates=$obj->getCondition($sql);
foreach ($cates as $k => $v) {
	$sql="select pid,id,cate_type,name from `cate` where `pid`=$v[id]";
	$cates[$k]['ch']=$obj->getCondition($sql);
}


// print_r($cates);